<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class UserChange extends Model
{
    protected $table = 'user_change';


    public function user()
    {
        return $this->belongsTo('App\User');
    }

    public static function getStatusList()
    {
        return [
            0 => '已申请',
            1 => '已发放',
            2 => '发放失败',
            3 => '已退款'
        ];
    }

    public static function getStatus($status)
    {
        return isset(self::getStatusList()[$status]) ? self::getStatusList()[$status] : '';
    }

    public static function getIndex()
    {
        return 110;
    }
}
